package ${packageName}.ui.activity

import com.jess.arms.di.component.AppComponent
import ${packageName}.R
import com.xm98.core.base.kt.BaseKtListActivity
import com.xm98.core.base.EmptyView
import com.xm98.core.base.ViewHolder
import com.chad.library.adapter.base.BaseQuickAdapter
import ${packageName}.bean.${entityName}
import ${packageName}.ui.adapter.${adapterName}

import ${componentPackageName}.Dagger${pageName}Component
import ${modulePackageName}.${pageName}Module
import ${contractPackageName}.${pageName}Contract
import ${presenterPackageName}.${pageName}Presenter

/**
 * Desc:
 * <p>
 * @author: user()
 * Date: date()
 * Company: @98du
 * Update Comments:
 *
 */
class ${pageName}Activity : BaseKtListActivity<${entityName}, ${pageName}Presenter>() , ${pageName}Contract.View<${entityName}> {

    override fun setupActivityComponent(appComponent:AppComponent) {
        Dagger${pageName}Component
                .builder()
                .appComponent(appComponent)
                .${extractLetters(pageName[0]?lower_case)}${pageName?substring(1,pageName?length)}Module(${pageName}Module(this))
                .build()
                .inject(this)
    }

    override fun begin() {

    }

    override fun setupEmptyView(emptyView: EmptyView) {
        emptyView.setEmptyText("还没有相关数据哦~")
                 .setEmptyImageResource(R.mipmap.ic_launcher)
                 .setRetryText("重试")
    }

    override fun generateAdapter(): BaseQuickAdapter<${entityName}, ViewHolder> {
        return ${adapterName}()
    }
}
